{extend  name="manage@public/layout" /}
{block name="content"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>缴费记录</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link" onclick="location.replace(location.href);">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <!--- 搜索--->
                            <form action="" method="post">
                                <div class="col-sm-1 col-sm-on">
                                    <input name="serial_number" placeholder="学员编号" value="{notempty name="data['serial_number']"}{$data['serial_number']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="user_name" placeholder="学员姓名" value="{notempty name="data['user_name']"}{$data['user_name']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="school_name" placeholder="学校名称" value="{notempty name="data['school_name']"}{$data['school_name']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                {if $data.admin_auth.level != 4 }
                                <div class="col-sm-1 col-sm-on">
                                    <input name="nickname" placeholder="录入者" value="{notempty name="data['nickname']"}{$data['nickname']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <input name="company_name" placeholder="公司名称" value="{notempty name="data['company_name']"}{$data['company_name']}{/notempty}" class="form-control input-sm layer-date">
                                </div>
                                {/if}
                                <div class="col-sm-1 col-sm-on">
                                    <select name="status" class="input-sm form-control input-s-sm inline">
                                        <option value="0" >审核状态</option>
                                        <option {notempty name="data['status']"}{eq name="data['status']" value="2"}selected{/eq}{/notempty} value="2">待审核</option>
                                        <option {notempty name="data['status']"}{eq name="data['status']" value="1"}selected{/eq}{/notempty} value="1">已审核</option>
                                    </select>
                                </div>
                                <div class="col-sm-4 col-sm-on col-sm-auto">
                                    <input style="width:155px;cursor:not-allowed;" placeholder="开始日期" class="input-sm form-control form-control layer-date" name="start" value="{empty name="data['start']"}{else/}{$data.start}{/empty}" readonly id="start"><i style="position: relative;top:5px;">&nbsp;-&nbsp;</i>
                                    <input style="width:155px;cursor:not-allowed;" placeholder="结束日期" class="input-sm form-control form-control layer-date" name="end" value="{empty name="data['end']"}{else/}{$data.end}{/empty}" readonly id="end">
                                </div>
                                <div class="col-sm-1 col-sm-botton">
                                    <div class="input-group">
                                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i></button>
                                    </div>
                                </div>
                                <!-- <div class="col-sm-1 col-sm-botton">
                                    <div class="input-group">
                                        <button title="导出" name="platform_export" value="export" type="submit" class="btn btn-sm btn-primary"><i class="fa fa-download"></i></button>
                                    </div>
                                </div> -->
                            </form>
                            <!--- end --->
                            <table class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>学员编号</th>
                                        <th>学员姓名</th>
                                        <th>报考学校</th>
                                        <th>报考类型</th>
                                        <th>报考层次</th>
                                        <th>协议金额</th>
                                        <th>已缴/补交金额</th>
                                        <th>未缴金额</th>
                                        <th>状态</th>
                                        <th>创建时间</th>
                                        <th>所属公司</th>
                                        {if $data.admin_auth.level != 4 } 
                                        <th>录入人</th>
                                        {/if}
                                        {if $data.admin_auth.level != 5 } 
                                        <th>分公司审核人</th>
                                        {/if}
                                        <th>审核时间</th>
                                        {if $data.admin_auth.level != 5 }
                                        {if $data.admin_auth.level != 3 }
                                        <th>总财务审核人</th>
                                        <th>审核时间</th>
                                        {/if}{/if}
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="list" id="vo"}
                                    <tr>
                                        <td>{$vo.id}</td>
                                        <td>{$vo.students_sn}</td>
                                        <td>{$vo.user_name}</td>
                                        <td>{$vo.school_name}</td>
                                        <td>{:\\app\\model\\StudentModel::type($vo.type)}</td>
                                        <td>{$vo.hierarchy}</td>
                                        <td>{$vo.agreement_price|abs}</td>
                                        <td>{$vo.submit_price|abs}</td>
                                        <td>{$vo.overdue_price|abs}</td>
                                        {if $data.admin_auth.level == 5 } 
                                            <td>
                                                {if $vo.status == 3 || $vo.status == 1}
                                                <span style="color: #1ab394;">已审核</span>
                                                {elseif $vo.status== 5 /}
                                                <span style="color: #ef5352;">总财务驳回</span>
                                                {elseif $vo.status== 4 /}
                                                <span style="color: #ef5352;">已驳回</span>
                                                {else /}
                                                <span style="color: #b8bdbf;">待审核</span>
                                                {/if}
                                            </td>
                                        {else/}
                                        <td>
                                            {if $vo.status == 3}
                                            <span style="color: #1ab394;">已审核</span>
                                            {elseif $vo.status== 5 /}
                                            <span style="color: #ef5352;">总财务驳回</span>
                                            {elseif $vo.status== 4 /}
                                            <span style="color: #ef5352;">分公司财务驳回</span>
                                            {else /}
                                            <span style="color: #b8bdbf;">待审核</span>
                                            {/if}
                                        </td>
                                        {/if}
                                        <td>{$vo.create_time}</td>
                                        <td>{$vo.company_name}</td>
                                        {if $data.admin_auth.level != 4 } 
                                        <td>{$vo.account_name}</td>
                                        {/if}
                                        {if $data.admin_auth.level != 5 } 
                                        <td>{$vo.audit_name|default='--'}</td>
                                        {/if}
                                        <td>{$vo.update_time}</td>
                                        {if $data.admin_auth.level != 5 } 
                                        {if $data.admin_auth.level != 3 }
                                        <td>{$vo.total_audit_name|default='--'}</td>
                                        <td>{$vo.total_update_time}</td>
                                        {/if}{/if}
                                        <td>
                                            {if $data.admin_auth.level == 5}
                                                {if $vo.status == 2}   
                                                    <button style="color:#1ab394;border:1px solid #1ab394;" title="审核通过" type="button" data-status="1" data-id="{$vo.id}" class="btn btn-sm bt-audit btn-white"><i class="fa fa-check"></i>&nbsp;审核通过</button>
                                                    <button style="color:red;border:1px solid red;" title="审核驳回" type="button" data-status="2" data-id="{$vo.id}" class="btn btn-sm bt-audit btn-white"><i class="fa fa-exclamation-circle"></i>&nbsp;审核驳回</button>
                                                {else/}
                                                    <span class="btn btn-sm btn-white"><i class="fa fa-ban"></i>&nbsp;无可操作</span>
                                                {/if}
                                            {elseif $data.admin_auth.level == 3 /}
                                                {if $vo.status == 1} 
                                                <button style="color:#1ab394;border:1px solid #1ab394;" title="审核通过" type="button" data-status="1" data-id="{$vo.id}" class="btn btn-sm bt-total-audit btn-white"><i class="fa fa-check"></i>&nbsp;审核通过</button>
                                                    <button style="color:red;border:1px solid red;" title="审核驳回" type="button" data-status="2" data-id="{$vo.id}" class="btn btn-sm bt-total-audit btn-white"><i class="fa fa-exclamation-circle"></i>&nbsp;审核驳回</button>
                                                {else/}
                                                    <span class="btn btn-sm btn-white"><i class="fa fa-ban"></i>&nbsp;无可操作</span>
                                                {/if}
                                            {else/}    
                                                <span class="btn btn-sm btn-white"><i class="fa fa-ban"></i>&nbsp;无可操作</span>
                                            {/if}
                                        </td>
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                            <div style="float:right;" class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                {$page|raw}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 
   
{/block}
{block name="script"}
<script src="/static/js/admin/students.js?v=1.3"></script>
<script>
    //时间插件
    var start = {
        elem:"#start",
        format:"YYYY-MM-DD hh:mm:ss",
        min:$("input[name='st_start']").val(),
        max:$("input[name='st_end']").val(),
        istime:true,
    };
    var end = {
        elem:"#end",
        format:"YYYY-MM-DD hh:mm:ss",
        min:$("input[name='st_start']").val(),
        max:$("input[name='st_end']").val(),
        istime:true,
    };
    laydate(start);laydate(end);


    function modaldemo() {
        $("#modal-demo").modal("show");
    }
</script>
{/block}

